<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<%@ include file="/WEB-INF/views/include/header.jsp"%>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-site-add">

			<div class="form-group">	
				<label class="col-sm-3 control-label">站点名称：</label>
				<div class="col-sm-8">
					<input id="siteName" name="siteName" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">站点简称：</label>
				<div class="col-sm-8">
					<input id="sitePath" name="sitePath" class="form-control" type="text">
				</div>
			</div>

			<div class="form-group">	
				<label class="col-sm-3 control-label">关键字：</label>
				<div class="col-sm-8">
					<input id="keywords" name="keywords" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">域名：</label>
				<div class="col-sm-8">
					<input id="domainName" name="domainName" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">访问协议：</label>
				<div class="col-sm-8">
					<input id="accessProtocol" name="accessProtocol" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">访问地址：</label>
				<div class="col-sm-8">
					<input id="accessPath" name="accessPath" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">模板名称：</label>
				<div class="col-sm-8">
					<input id="templateName" name="templateName" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">模板路径：</label>
				<div class="col-sm-8">
					<input id="templatePath" name="templatePath" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">是否主站：</label>
				<div class="col-sm-8">
					<c:forEach items="${fnc:getDictDataByTypeList('cms_ismaster_status')}" var="dict">
						<div class="radio-box">
							<input type="radio" id="${dict.dictCode}" name="isMaster" value="${dict.dictValue}" checked="${dict.isDefault == '0' ? true : false}"/>
							<label for="${dict.dictCode}">${dict.dictLabel}</label>
						</div>
					</c:forEach>
				</div>
			</div>

			<div class="form-group">	
				<label class="col-sm-3 control-label">排序：</label>
				<div class="col-sm-8">
					<input id="sort" name="sort" class="form-control" type="text">
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">状态：</label>
				<div class="col-sm-8">
					<c:forEach items="${fnc:getDictDataByTypeList('sys_normal_disable')}" var="dict">
						<div class="radio-box">
							<input type="radio" id="${dict.dictCode}" name="status" value="${dict.dictValue}" checked="${dict.isDefault == '1' ? true : false}"/>
							<label for="${dict.dictCode}">${dict.dictLabel}</label>
						</div>
					</c:forEach>
				</div>
			</div>

			<div class="form-group">	
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<input id="remark" name="remark" class="form-control" type="text">
				</div>
			</div>
		</form>
	</div>
	<%@ include file="/WEB-INF/views/include/footer.jsp"%>
    <script type="text/javascript">
		var prefix = ctx + "cms/site"
		$("#form-site-add").validate({
			rules:{
                siteName:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-site-add').serialize());
	        }
	    }
	</script>
</body>
</html>
